import request from '@/utils/request'

export function business(id) {
  return request({
    url: '/company/' + id,
    method: 'get'
  })
}
export function getRole(params) {
  return request({
    url: '/sys/role',
    method: 'get',
    params
  })
}
export function delRole(id) {
  return request({
    url: '/sys/role/' + id,
    method: 'DELETE'
  })
}
export function addRole(data) {
  return request({
    url: '/sys/role',
    method: 'post',
    data
  })
}
export function editRole(id, data) {
  return request({
    url: '/sys/role/' + id,
    method: 'put',
    data
  })
}
export function getRoleDetail(id) {
  return request({
    url: `/sys/role/${id}`
  })
}
